def toTimeStr(seconds):
    seconds = float(seconds)
    residue = round((seconds-int(seconds))*1000)
    seconds = int(seconds)

    minutes = seconds // 60
    seconds = seconds % 60

    hours = minutes // 60
    minutes = minutes % 60

    hours = ("0" + str(hours)) if hours < 10 else str(hours)
    minutes = ("0" + str(minutes)) if minutes < 10 else str(minutes)
    seconds = ("0" + str(seconds)) if seconds < 10 else str(seconds)

    if residue < 10:
        residue = '00' + str(residue)
    elif 10 <= residue < 100:
        residue = '0' + str(residue)
    else:
        residue = str(residue)

    return hours + ':' + minutes + ':' + seconds + ',' + residue